Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This is a long-overdue PR to improve both the performance and readability of our unit tests. I do the following:
test_eos_unit
into multiple smaller files. In particular, the tabulated EOSs are new separated into sesame and stellar collapse files. The lower-level tests for, e.g., root finding are in a separate file now, and the tests for vector EOS and EOS builder are in separate files. This dramatically improves readability, but it actually made compile times worse (for reasons will explain below).eos_unit_tests
executable into 3 executables, which are all registered withctest
. I try to organize around theme (such as analytic EOS, or infrastructure). This reduces link times, as we can link 3 different executables in parallel, all of which are smaller.CATCH_CONFIG_FAST_COMPILE
flag. I'm actually not sure what this does... remove some error handling, I think. It improves compile times by 20% or so.With all these changes, I am able to shrink compile times (without closures, or fortran, or sesame) to 2m30s. This is a more than 2x improvement. I also think the code is substantially cleaner now.
There's one more improvement I'd like to make, probably in a separate PR, which I would like some input on. See issue #309 .
PR Checklist
make format
command after configuring withcmake
.